package com.google.code.garbagecan.ejb3study.rest.sample1;

import java.util.List;
import java.util.Properties;

import javax.naming.Context;
import javax.naming.InitialContext;

public class MyTest {
	public static void main(String[] args) throws Exception {
		test1();
	}
	
	public static void test1() throws Exception {
		Properties props = new Properties();
		props.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.core.LocalInitialContextFactory");
		Context ctx = new InitialContext(props);
		UserService userService = (UserService) ctx.lookup("java:global/ejb3study-rest/UserService");
		List<User> users =  userService.list(0, 20);
		System.out.println(users);
	}
}
